package com.kaibes.module.api.client;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.kaibes.web.api.ApiLinkData;
import com.kaibes.web.feign.FeignConfig;

@FeignClient(value = "${kaibes.module.api.client.service-name}", configuration = FeignConfig.class)
public interface ApiClient {
    
    @PostMapping("${kaibes.module.api.client.api-uri:/apis}/{service}")
    void post(@PathVariable String service, @RequestBody List<ApiLinkData> data);
    
    @DeleteMapping("${kaibes.module.api.client.api-uri:/apis}/{service}")
    void delete(@PathVariable String service);
    
}
